package com.eascs.web.o2o.report.quartz;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.eascs.app.log.Logger;
import com.eascs.app.log.LoggerFactory;
import com.eascs.web.o2o.quartz.util.BaseJobUtil;
import com.eascs.web.o2o.quartz.util.ExecutorService;
import com.eascs.web.o2o.report.service.BuildEmailService;
import com.eascs.web.o2o.report.service.BuildExcelService;

@Component("MonthReportQuartz")
public class MonthReportQuartz extends BaseJobUtil {
	protected final Logger logger = LoggerFactory.getLogger(getClass());

	@Autowired
	BuildExcelService buildExcelService;
	@Autowired
	BuildEmailService buildEmailService;

	public void creditManagerRankReport() {
		executor("MonthReportQuartz", "creditManagerRankReport", "生成省区信贷经理贷款投放统计及排名任务", new ExecutorService() {
			@Override
			public void exe() {
				buildExcelService.creditManagerRankReport();
			}
		});
	}

	public void creditManagerRankMail() {
		executor("MonthReportQuartz", "creditManagerRankReport", "生成省区信贷经理贷款投放统计及排名任务", new ExecutorService() {
			@Override
			public void exe() {
				buildEmailService.creditManagerRankMail();
			}
		});
	}

	public void provinceBusinessRankReport() {
		executor("MonthReportQuartz", "provinceBusinessRankReport", "生成全国各省区贷款投放排名任务", new ExecutorService() {
			@Override
			public void exe() {
				buildExcelService.provinceBusinessRankReport();
			}
		});
	}

	public void provinceBusinessRankMail() {
		executor("MonthReportQuartz", "provinceBusinessRankMail", "生成全国各省区贷款投放排名邮件任务", new ExecutorService() {
			@Override
			public void exe() {
				buildEmailService.provinceBusinessRankMail();
			}
		});
	}

}
